import axios from 'axios';
import qs from 'qs'
import Vue from 'vue'
axios.defaults.baseURL = process.env.VUE_APP_ROOTAPI;
var myAxios={
    get:(url,params)=>{
        return axios.get(url,{params:params})
        .then((resp)=>{
            return resp;
        })
    },
    post:(url,params,config)=>{
        return axios.post(url,qs.stringify(params),config)
        .then((resp)=>{
            console.log('post完成')
            return resp;
        })
    }
}
Vue.prototype.$http = myAxios;
export default(myAxios);